package com.atguigu.gmall.weball.retry;

import feign.RetryableException;
import feign.Retryer;

/**
 * @author lfy
 * @Description
 * @create 2023-07-22 11:56
 */
public class MyRetryer implements Retryer {
    private Integer count = 0;
    private Integer max = 3;
    @Override
    public void continueOrPropagate(RetryableException e) {
        if(++count > max){
            throw e;
        }
    }

    @Override
    public Retryer clone() {
        return new MyRetryer();
    }
}
